package com.tensquare.recruit.dao;

import com.tensquare.recruit.pojo.Recruit;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * Created by WF on 2020/3/30 15:26
 */
public interface RecruitDao extends JpaRepository<Recruit,String> {
    //1.查询前4个，按照状态值并且按照时间倒序查询
    List<Recruit> findTop4ByStateOrderByCreatetimeDesc(String state);
    //2.查询前12个，状态不为0，按照创建时间倒序查询
    List<Recruit> findTop12ByStateNotOrderByCreatetimeDesc(String state);
}
